<?php

class PublicAction extends Action {
    /*
     * 退出系统
     */

    public function logout() {
        unset($_SESSION['user_role']);
         $this->redirect('Public/login');
    }
    
    public function login(){
        $this->display();
    }

   public function verify() {
        import("ORG.Util.Image");
        Image::buildImageVerify();
    }
    
    public function checklogin(){
        if (empty($_REQUEST['username'])){
            $this->redirect('Public/login');
        }
        $_SESSION['user_role'] = $_REQUEST['username'];
        $_SESSION['user_name'] = '小张';
        $this->redirect('Index/index');
    }

}

?>
